home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / tde40.zip / maketde < prev    next >
Text File  |  1994-06-05  |  5KB  |  250 lines

  1. #
  2. # Compilers supported == MSC 5.1, MSC 6.0ax, MSC 7.0, QC 2.5, and BCC 3.1
  3. # Makes supported     == Microsoft's nmake and Borland's make
  4. #
  5. # To make TDE with Microsoft compilers, change the defines as needed and type:
  6. #
  7. #      nmake maketde
  8. #
  9. # To make TDE with Borland's make, change the appropriate defines and type:
  10. #
  11. #      make -f maketde
  12. #
  13. #          Incidentally, Borland requires about twice as much room for
  14. #           assertions as Microsoft.  If the DGROUP is violated, either
  15. #           comment out some assertions in the TDE source code or turn
  16. #           assertions off altogether.
  17.  
  18.  
  19. PROJ      = tde
  20.  
  21.  
  22. #
  23. # Define your favorite compiler last
  24. #
  25. COMPILER   = QUICKC
  26. COMPILER   = BCC
  27. COMPILER   = MSC
  28.  
  29.  
  30. #
  31. # Define your favorite assembler last
  32. #
  33. ASSEMBLER  = MASM51
  34. ASSEMBLER  = QUICKASSEMBLER
  35. ASSEMBLER  = TASM
  36. ASSEMBLER  = MASM6
  37.  
  38.  
  39. #
  40. # Assertions may be turned off or on.  I usually leave assertions on.
  41. #
  42. ASSERTIONS = ON
  43. ASSERTIONS = OFF
  44. ASSERT     = TDE
  45. !IF "$(ASSERTIONS)" == "OFF"
  46. !UNDEF ASSERT
  47. !ENDIF
  48.  
  49.  
  50. #
  51. # Compiler and linker flags and switches.
  52. #
  53. !IF "$(COMPILER)" == "MSC"
  54. CC      = cl
  55. !IFDEF ASSERT
  56. CFLAGS  = /c /AM /W4 /Ot /D__MSC__
  57. !ELSE
  58. CFLAGS  = /c /AM /W4 /Ot /Gs /D__MSC__ /DNDEBUG
  59. !ENDIF
  60. LINK    = link
  61. LFLAGS  = /STACK:5632 /NOI
  62.  
  63. !ELSE
  64. !IF "$(COMPILER)" == "QUICKC"
  65. CC      = qcl
  66. !IFDEF ASSERT
  67. CFLAGS  = /c /AM /D__MSC__ /Ot /W4
  68. !ELSE
  69. CFLAGS  = /c /AM /D__MSC__ /Ot /W4 /DNDEBUG
  70. !ENDIF
  71. LINK    = qlink
  72. LFLAGS  = /STACK:5632 /NOI
  73.  
  74. !ELSE
  75. !IF "$(COMPILER)" == "BCC"
  76. CC      = bcc
  77. !IFDEF ASSERT
  78. CFLAGS  = -c -G -mm -O2 -tDe -w -N
  79. !ELSE
  80. CFLAGS  = -c -G -mm -O2 -tDe -w -DNDEBUG
  81. !ENDIF
  82. LINK    = tlink
  83. LFLAGS  = /Td /c
  84.  
  85. !ELSE
  86. !ERROR I only know how to make MSC, QuickC, and BCC.
  87. !ENDIF
  88. !ENDIF
  89. !ENDIF
  90.  
  91.  
  92. #
  93. # Assembler flags and switches.
  94. #
  95. !IF "$(ASSEMBLER)" == "MASM51"
  96. AS      = MASM
  97. AFLAGS  = /c /MX
  98.  
  99. !ELSE
  100.  
  101. !IF "$(ASSEMBLER)" == "MASM6"
  102. AS      = ML
  103. AFLAGS  = /c /Cp /Zm
  104.  
  105. !ELSE
  106. !IF "$(ASSEMBLER)" == "QUICKASSEMBLER"
  107. AS      = QCL
  108. AFLAGS  = /c
  109.  
  110. !ELSE
  111. !IF "$(ASSEMBLER)" == "TASM"
  112. AS      = TASM
  113. AFLAGS  = /Mx
  114. !ELSE
  115. !ERROR I only know how to make MASM, QuickAssembler, and TASM.
  116. !ENDIF
  117. !ENDIF
  118. !ENDIF
  119. !ENDIF
  120.  
  121.  
  122. #
  123. # Define the compiler and assembler rules
  124. #
  125. .c.obj :
  126.         $(CC) $(CFLAGS) $<
  127.  
  128. .asm.obj :
  129.         $(AS) $(AFLAGS) $<
  130.  
  131.  
  132. #
  133. # List the dependent obj files
  134. #
  135. TDEOBJS = bj_ctype.obj block.obj capslock.obj config.obj console.obj criterr.obj\
  136.           diff.obj dirlist.obj ed.obj file.obj findrep.obj hwind.obj\
  137.           main.obj macro.obj pull.obj port.obj regx.obj sort.obj tab.obj\
  138.           tdeasm.obj utils.obj window.obj wordwrap.obj int24.obj simul101.obj
  139.  
  140.  
  141. all: $(PROJ).exe
  142.  
  143.  
  144. #
  145. # List the rules for the obj files.
  146. #
  147. BJ_CTYPE.obj : BJ_CTYPE.c tdestr.h common.h tdefunc.h define.h
  148.  
  149. BLOCK.obj    : BLOCK.c    tdestr.h common.h tdefunc.h define.h
  150.  
  151. CAPSLOCK.obj : CAPSLOCK.c tdestr.h common.h tdefunc.h define.h
  152.  
  153. CONFIG.obj   : CONFIG.c   tdestr.h common.h tdefunc.h define.h
  154.  
  155. CONSOLE.obj  : CONSOLE.c  tdestr.h common.h tdefunc.h define.h
  156.  
  157. CRITERR.obj  : CRITERR.c  tdestr.h common.h tdefunc.h define.h criterr.h
  158.  
  159. DIFF.obj     : DIFF.c     tdestr.h common.h tdefunc.h define.h
  160.  
  161. DIRLIST.obj  : DIRLIST.c  tdestr.h common.h define.h tdefunc.h
  162.  
  163. ED.obj       : ED.c tdestr.h global.h tdefunc.h define.h default.h prompts.h
  164.  
  165. FILE.obj     : FILE.c     tdestr.h common.h tdefunc.h define.h
  166.  
  167. FINDREP.obj  : FINDREP.c  tdestr.h common.h tdefunc.h define.h
  168.  
  169. HWIND.obj    : HWIND.c    tdestr.h common.h tdefunc.h define.h
  170.  
  171. MACRO.obj    : MACRO.C    tdestr.h common.h tdefunc.h define.h
  172.  
  173. MAIN.obj     : MAIN.c tdestr.h common.h tdefunc.h define.h default.h help.h
  174.  
  175. PORT.obj     : PORT.c     tdestr.h common.h tdefunc.h define.h
  176.  
  177. PULL.obj     : PULL.c     tdestr.h common.h tdefunc.h define.h
  178.  
  179. REGX.obj     : REGX.c     tdestr.h common.h tdefunc.h define.h
  180.  
  181. SORT.obj     : SORT.c     tdestr.h common.h tdefunc.h define.h
  182.  
  183. TAB.obj      : TAB.c      tdestr.h common.h tdefunc.h define.h
  184.  
  185. TDEASM.obj   : TDEASM.c   tdestr.h common.h tdefunc.h define.h
  186.  
  187. UTILS.obj    : UTILS.c    tdestr.h common.h tdefunc.h define.h
  188.  
  189. WINDOW.obj   : WINDOW.c   tdestr.h common.h tdefunc.h define.h
  190.  
  191. WORDWRAP.obj : WORDWRAP.c tdestr.h common.h tdefunc.h define.h
  192.  
  193. int24.obj    : int24.asm
  194.  
  195. simul101.obj : simul101.asm
  196.  
  197.  
  198. #
  199. # Once we get everything compiled, link with either Microsoft or Borland stuff.
  200. # Incidentally, blank lines are significant for the linker response files.
  201. #
  202. #  Borland linker
  203. #
  204. !IF "$(COMPILER)" == "BCC"
  205. $(PROJ).exe  : $(TDEOBJS)
  206.         $(LINK) $(LFLAGS) @&&%
  207. C0M  $(TDEOBJS)
  208. $*
  209.  
  210. CM.LIB
  211. %
  212. !ELSE
  213. #
  214. # Microsoft linker
  215. #
  216. $(PROJ).exe : $(TDEOBJS)
  217.         echo >NUL @<<$(PROJ).crf
  218. bj_ctype.obj+
  219. block.obj+
  220. capslock.obj+
  221. config.obj+
  222. console.obj+
  223. criterr.obj+
  224. diff.obj+
  225. dirlist.obj+
  226. ed.obj+
  227. file.obj+
  228. findrep.obj+
  229. hwind.obj+
  230. macro.obj+
  231. main.obj+
  232. port.obj+
  233. pull.obj+
  234. regx.obj+
  235. sort.obj+
  236. tab.obj+
  237. tdeasm.obj+
  238. utils.obj+
  239. window.obj+
  240. wordwrap.obj+
  241. simul101.obj+
  242. int24.obj
  243. $(PROJ).EXE
  244.  
  245.  
  246.  
  247. <<
  248.         ilink -a -e "$(LINK) $(LFLAGS) @$(PROJ).crf" $(PROJ)
  249. !ENDIF
  250.